package praca.framework;

public class Circle {
	
	public final Vector center = new Vector(0,0);
	public float radius;
	
	public Circle(float x, float y, float radius) {
		
		this.center.setXY(x,y);
		this.radius = radius;
	}
	
	public boolean overlapCircles(Circle c1, Circle c2) {
		
		float distance = c1.center.distSquared(c2.center);
		float radiusSum = c1.radius + c2.radius;
		return distance <= radiusSum * radiusSum;
		
	}
	
}
